\hypertarget{laplace1D_8cpp}{
\subsection{Examples/03Laplace/laplace1D.cpp File Reference}
\label{laplace1D_8cpp}\index{Examples/03Laplace/laplace1D.cpp@{Examples/03Laplace/laplace1D.cpp}}
}


Solving the Laplace equation in 1D.  




\subsubsection{Detailed Description}
\begin{DoxyAuthor}{Author}
Luis M. de la Cruz Salas \mbox{[} Fri Mar 21 12:26:33 GMT 2010 \mbox{]}
\end{DoxyAuthor}
This code solves the Laplace equation in one dimension: $ \nabla^2 T = 0 $. This equation is solved in the interval $ x \in [0,1] $. The initial condition for the temperature is $ T = 10 \cos(3 \pi x) $ and the boundary conditions: $ T=10 $ for $ x=0 $, and $ T=-10 $ for $ x = 1 $. You can choose between Gauss-\/Seidel or Thomas algorithms to solve this problem. In the case of Gauss-\/Seidel you need to specify the maximum number of iterations. \begin{DoxyParagraph}{Compiling and running}
Modify the variables BASE and BLITZ in the file {\ttfamily tuna-\/cfd-\/rules.in} according to your installation and then type the next commands: \begin{DoxyVerb}
   % make
   % ./laplace1D  \end{DoxyVerb}

\end{DoxyParagraph}
The results are stored in {\ttfamily Data1D}. 

Definition in file \hyperlink{laplace1D_8cpp_source}{laplace1D.cpp}.

